﻿using Lis.DALFactory;
using Lis.IDAL;
using Lis.IRepository;
using Lis.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Lis.Repository
{
    public class UserCirculateRepository : GenericRepository<UserCirculate>, IUserCirculateRepository
    {
        public override void GetDal()
        {
            CurrentDal = AbstractDalFactory.GetUserCirculateDal();
        }

        #region 01，根据读者类型和典藏地查询流通信息+IEnumerable<UserCirculate> GetEntitiesByUserType(string userType, string collectionCode)
        /// <summary>
        /// 根据读者类型和典藏地查询流通信息
        /// </summary>
        /// <param name="userType">读者类型</param>
        /// <param name="collectionCode">典藏地</param>
        /// <returns></returns>
        public IEnumerable<UserCirculate> GetEntitiesByUserType(string userType, string collectionCode)
        {
            return ((IUserCirculateDal)CurrentDal).GetEntitiesByUserType(userType, collectionCode);
        } 
        #endregion

        #region 02，根据读者类型查询流通信息+IEnumerable<UserCirculate> GetEntitiesByUserType(string userType)
        /// <summary>
        /// 根据读者类型查询流通信息
        /// </summary>
        /// <param name="userType"></param>
        /// <returns></returns>
        public IEnumerable<UserCirculate> GetEntitiesByUserType(string userType)
        {
            return ((IUserCirculateDal)CurrentDal).GetEntitiesByUserType(userType);
        } 
        #endregion
    }
}
